#include <iostream>

using namespace std;
int main(){
	int n;
	int a=0,b=0,c=0;
	cin >> n;
	while (n != -1){
		
		if (n==1){
			a++;
		}
		else if(n == 2){
			b++;
		}
		else if(n == 3){
			c++;
		}
		cin >> n;
	}
	cout << 'A' << '=' << a << endl;
	cout << 'B' << '=' << b << endl;
	cout << 'C' << '=' << c << endl;
	int tot = a + b + c;
	cout << "Tot" << '=' << tot << endl;
	if(a > tot / 2){
		cout << "A-yes";
	}
	else if(b > tot / 2){
		cout << "B-yes";
	}
	else if(c > tot / 2){
		cout << "C-yes";
	}
	else{
		cout << "all-NO";
	}
} 
